﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ueEngine.Framework.Exception
{
    /// <summary>
    /// 普通错误，出现这样的错误，通常是由于输入参数错误造成的
    /// </summary>
    public class ContextException : System.Exception
    {
        public ContextException(string message, ExceptionType type,ContextExceptionCode code)
            : base(message)
        {
            this.ExceptionType = type;
            this.ExceptionCode = code;
        }
        public ExceptionType ExceptionType { get; set; }
        public ContextExceptionCode ExceptionCode { get; set; }
    }

    public enum ContextExceptionCode
    {
        /// <summary>
        /// 制定用户不存在
        /// </summary>
        UserIsNotFound,
        /// <summary>
        /// 输入参数有误
        /// </summary>
        ParameterIsInvalid,
        /// <summary>
        /// 广告项目不存在
        /// </summary>
        AdvertNotFound,
        /// <summary>
        /// 公告不存在
        /// </summary>
        NoticeNotFound,
        /// <summary>
        /// 未找到储备的人才信息
        /// </summary>
        TalentIsNotFound,
        /// <summary>
        /// 指定招募信息不存在
        /// </summary>
        RecruiterSheetIsNotFound,
        /// <summary>
        /// 未找到收藏的企业信息
        /// </summary>
        RecruiterCollectIsNotFound,
        /// <summary>
        /// 指定评论信息不存在
        /// </summary>
        DisscessIsNotFound,
        /// <summary>
        /// 指定代理企业不存在
        /// </summary>
        DepositCompanyIsNotFound,
        /// <summary>
        /// 指定活动现场信息不存在
        /// </summary>
        ActivityIsNotFound,
        /// <summary>
        /// 指定证件信息不存在
        /// </summary>
        CertificationIsNotFound,
        /// <summary>
        /// 指定职位申请单不存在
        /// </summary>
        RequestSheetIsNotFound,
        /// <summary>
        /// 指定代理人的公司信息不存在
        /// </summary>
        CorporationIsNotFound,
        /// <summary>
        /// 指定简历不存在
        /// </summary>
        ResumeIsNotFound,
        /// <summary>
        /// 指定职位信息不存在
        /// </summary>
        PositionIsNotFound,
        /// <summary>
        /// 创建职位索引失败
        /// </summary>
        IndexPositionFaild,
        /// <summary>
        /// 不允许匿名访问
        /// </summary>
        AnonymityIsRefuse,
    }
}
